package cn.xn.hrms.domain.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @author ysz
 */
@Getter
public enum ResultEnum {
    SUCCESS(200, "操作成功"),
    UPLOAD_SUCCESS(0, "上传成功"),
    DEPARTMENT_NOT_EXIST(10, "部门未找到"),
    POSITION_NOT_EXIST(11, "岗位未找到"),
    PERSONAL_NOT_EXIST(12, "员工未找到"),
    PERSONAL_TRAIN_NOT_EXIST(13, "员工培训记录未找到"),
    PERSONAL_REWARD_NOT_EXIST(14, "员工奖惩记录未找到"),
    PERSONAL_SALARY_NOT_EXIST(15, "员工薪资记录未找到"),
    RECRUIT_NOT_EXIST(16, "招聘记录未找到"),

    USER_NOT_EXIST(20, "用户不存在"),
    PASSWORD_FAIL(21, "用户名或密码错误"),
    CODE_NOT_EXIST(22, "请输入验证码"),
    CODE_FAIL(23, "验证码错误"),
    CODE_INVALID(27, "验证码已过期"),
    DEPARTMENT_IS_BIND(24, "部门存在关联员工"),
    POSITION_IS_BIND(25, "部门存在关联岗位"),
    POSITION_EXIST_PERSONAL(26, "岗位存在关联员工"),

    UPLOAD_FAIL(50, "服务器上传失败"),
    UPLOAD_NOT_ENABLE(51, "上传配置未开启"),
    AUTHENTICATE_FAIL(5000, "认证异常,请重新登录"),
    AUTHORIZATION_FAIL(5001, "用户无权限"),
    ERROR(500, "未知错误"),
    PARAM_ERROR(501, "参数错误"),
    USER_NAME_EXISTS(99, "用户名已存在"),
    OLD_PASSWORD_ERROR(100, "输入的旧密码不正确"),
    MENU_DELETE_ERROR(101, "当前节点下面有子节点，不能删除"),
    PASSWORD_ERROR(102, "密码错误"),
    UPLOAD_ERROR(103, "图片上传失败"),
    LOG_IN_AGAIN(999, "账号在另一地点登录，您已被迫下线！"),
    USER_NO_ROLE(201, "用户无角色，请联系管理员！"),
    USER_NO_MENU(202, "用户没有菜单权限，请联系管理员！"),
    DEPARTMENT_EXISTS(203, "部门已存在"),
    MYBATIS_ERROR(204,"数据库操作异常")

    ;




    private final Integer code;
    private final String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
